#include<cstdio>
#include<cmath>
#include<cstring>
#include<algorithm>
typedef long long ll;
const int maxn = 1000;
int month_days[2][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31},{0,31,29,31,30,31,30,31,31,30,31,30,31}};
bool isLeap(int year)
{
	return (year%4==0 && year%100!=0 || year%400==0);
}
int daynum(int date){
	int num=0;
	int year=date/10000; //printf("%d\n",year);
	int month=(date/100)%100; //printf("%d\n",month);
	int day=date%100; //printf("%d\n",day);
	for(int i=1;i<year;i++){
		if(isLeap(i)) num+=366;
		else num+=365;
		//printf("%d\n",num);
	}
	for(int j=1;j<month;j++){
		num+=month_days[isLeap(year)][j]; 
	}
	num+=day;
	return num;
}
int main(){
	int a,b;
	while(scanf("%d %d",&a,&b)==2){
		if(a<b){
		int temp=a;
		a=b;
		b=temp;
	}
	int m=daynum(a),n=daynum(b);
	
	printf("%d\n",m-n+1);
	}
	return 0;
}
